package com.best.core.exception;

/**
 * @ClassName: CommonExceptionEnum
 * @Package: com.best.core.exception
 * @Description: 异常码枚举，用于第定义自定义异常相关信息
 * @Datetime: 2020/6/5 17:54
 * @Author: nike
 */
public enum CommonExceptionEnum implements CommonExceptionCode {

    REDIS_VALUE_IS_NULL(Boolean.FALSE, 404, "REDIS VALUE IS NULL !"),
    TRANSACTION_IS_ERROR(Boolean.FALSE, 500, "事务异常 !"),
    SYSTEM_IS_ERROR(Boolean.FALSE, 500, "系统异常,请稍后再试!");

    private final Boolean flag;
    private final Integer code;
    private final String message;



    CommonExceptionEnum(Boolean flag, Integer code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    @Override
    public Boolean getFlag() {
        return flag;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return message;
    }
}
